﻿using System;
using System.Threading.Tasks;

namespace Mt.Site.Core.Members
{
    public interface IMembersCache
    {
        Task Login(MemberCacheItem memeberCacheItem);
        Task Update(MemberCacheItem memeberCacheItem);

        void Logout(Guid? memberId); 

        /// <summary>
        /// 通过Ticket从缓存中获取用户信息
        /// </summary>
        /// <returns></returns>
        Task<MemberCacheItem> TryGetMemberInfo(Guid userId);

        MemberCookieItem GetMemberCookieItem();
    }
}
